<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>一维数组最大值</title>
	// <script type="text/javascript">
	// arr = [1,56,23,6,43,87,3,5,55];
	// alert(Math.max.apply(null, arr));
// -----------------------多维数组最大值---------------------------
	var a=[1,2,3,[5,6],[1,4,8,66],[46,0,7,3]];
	var ta=a.join(",").split(",");//转化为一维数组
	alert(Math.max.apply(null,ta));//最大值
	</script>
</head>
<body>
	
</body>
</html>